<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>信工二手淘</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--Loading bootstrap css-->
    <!--  <link type="text/css" rel="stylesheet" href="http://fonts.useso.com/css?family=Open+Sans:400italic,400,300,700">
      <link type="text/css" rel="stylesheet" href="http://fonts.useso.com/css?family=Oswald:400,700,300">-->
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/jquery-ui-1.10.4.custom.min.css">
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/animate.css">
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/all.css">
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/main.css">
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/style-responsive.css">
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/zabuto_calendar.min.css">
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/pace.css">
    <link type="text/css" rel="stylesheet" href="/static/demo/styles/jquery.news-ticker.css">
</head>

<body>
<div>
    <!--BEGIN TOPBAR-->
    <div id="header-topbar-option-demo" class="page-header-topbar">
        <nav id="topbar" role="navigation" style="margin-bottom: 0;" data-step="3"
             class="navbar navbar-default navbar-static-top">
            <div class="navbar-header">
                <button type="button" data-toggle="collapse" data-target=".sidebar-collapse" class="navbar-toggle">
                    <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a id="logo" class="navbar-brand">
                    <span class="fa fa-rocket"></span>
                    <span class="logo-text">信工二手淘</span>
                    <span style="display: none" class="logo-text-icon"></span>
                </a>
            </div>
            <div class="topbar-main"><a id="menu-toggle" href="#" class="hidden-xs"><i class="fa fa-bars"></i></a>

                <form id="topbar-search" action="" method="" class="hidden-sm hidden-xs">
                    <div class="input-icon right text-white"><a href="#"><i class="fa fa-search"></i></a><input
                            type="text" placeholder="Search here..." class="form-control text-white"/></div>
                </form>
            </div>
        </nav>
    </div>
    <!--END TOPBAR-->
    <div id="wrapper">
        <!--BEGIN SIDEBAR MENU-->
        <nav id="sidebar" role="navigation" data-step="2"
             data-intro="Template has &lt;b&gt;many navigation styles&lt;/b&gt;"
             data-position="right" class="navbar-default navbar-static-side">
            <div class="sidebar-collapse menu-scroll">
                <ul id="side-menu" class="nav">

                    <div class="clearfix"></div>
                    <li class="active"><a href="/index/toIndex"><i class="fa fa-home">
                        <div class="icon-bg bg-orange"></div>
                    </i><span class="menu-title">首页详情</span></a>
                    </li>
                    <li><a href="/index/productinfo/1/all">
                        <i class="fa fa-briefcase">
                            <div class="icon-bg bg-green"></div>
                        </i><span class="menu-title">市场管理</span></a>
                    </li>
                    <li><a href="/index/rentinfo/1">
                        <i class="fa fa-money">
                            <div class="icon-bg bg-green"></div>
                        </i><span class="menu-title">租赁管理</span></a>
                    </li>
                    <li>
                        <a href="/index/userinfo/1">
                            <i class="fa fa-user">
                                <div class="icon-bg bg-pink"></div>
                            </i><span class="menu-title">用户管理</span></a>
                    </li>
                    <li>
                        <a href="">
                            <i class="fa fa-edit">
                                <div class="icon-bg bg-pink"></div>
                            </i><span class="menu-title">首页轮播修改</span></a>
                    </li>
                    <li>
                        <a href="">
                            <i class="fa fa-delicious">
                                <div class="icon-bg bg-pink"></div>
                            </i><span class="menu-title">用户留言删除</span></a>
                    </li>
                    <li>
                        <a href="">
                            <i class="fa fa-check-square">
                                <div class="icon-bg bg-pink"></div>
                            </i><span class="menu-title">投诉建议</span></a>
                    </li>
                    </li>
                    <li><a href="/toLogin"><i class="fa fa-arrow-circle-right">
                        <div class="icon-bg bg-green"></div>
                    </i><span class="menu-title">返回登录</span></a>

                    </li>
                </ul>
            </div>
        </nav>
        <!--END SIDEBAR MENU-->

        <!--BEGIN PAGE WRAPPER-->
        <div id="page-wrapper">
            <!--BEGIN TITLE & BREADCRUMB PAGE-->
            <div id="title-breadcrumb-option-demo" class="page-title-breadcrumb">
                <div class="page-header pull-left">
                    <div class="page-title">
                        <span style="font-size: 24px;" th:text="'当前登录用户是：'+${session.nowUser.username}"></span>
                    </div>
                </div>
                <ol class="breadcrumb page-breadcrumb pull-right">
                    <li><i class="fa fa-home"></i>&nbsp;<a>主页</a>&nbsp;&nbsp;
                        <i class="fa fa-angle-right"></i>&nbsp;&nbsp;
                    </li>
                </ol>
                <div class="clearfix">
                </div>
            </div>
            <!--END TITLE & BREADCRUMB PAGE-->
            <!--BEGIN CONTENT-->
            <div class="page-content">

                <div class="row">
                    <div class="col-md-6">
                        <div class="portlet box">
                            <div class="portlet-header">
                                <div class="caption">总活跃量</div>
                                <div class="tools"><i class="fa fa-chevron-up"></i><i class="fa fa-cog"></i><i
                                        class="fa fa-refresh"></i><i class="fa fa-times"></i></div>
                            </div>
                            <div class="portlet-body">
                                <div id="column-chart1" style="width: 100%; height:300px"></div>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="portlet box">
                            <div class="portlet-header">
                                <div class="caption">日-周-月活跃量</div>
                                <div class="tools"><i class="fa fa-chevron-up"></i><i class="fa fa-cog"></i><i
                                        class="fa fa-refresh"></i><i class="fa fa-times"></i></div>
                            </div>
                            <div class="portlet-body">
                                <div id="column-chart2" style="width: 100%; height:300px"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <!--END CONTENT-->
            </div>
            <!--END PAGE WRAPPER-->
        </div>
    </div>
</div>
</body>
<script src="/static/demo/script/jquery-1.10.2.min.js"></script>
<script src="/static/demo/script/jquery-migrate-1.2.1.min.js"></script>
<script src="/static/demo/script/jquery-ui.js"></script>
<script src="/static/demo/script/bootstrap.min.js"></script>
<script src="/static/demo/script/bootstrap-hover-dropdown.js"></script>
<script src="/static/demo/script/html5shiv.js"></script>
<script src="/static/demo/script/respond.min.js"></script>
<script src="/static/demo/script/jquery.metisMenu.js"></script>
<script src="/static/demo/script/jquery.slimscroll.js"></script>
<script src="/static/demo/script/jquery.cookie.js"></script>
<script src="/static/demo/script/icheck.min.js"></script>
<script src="/static/demo/script/custom.min.js"></script>
<script src="/static/demo/script/jquery.news-ticker.js"></script>
<script src="/static/demo/script/jquery.menu.js"></script>
<script src="/static/demo/script/pace.min.js"></script>
<script src="/static/demo/script/holder.js"></script>
<script src="/static/demo/script/responsive-tabs.js"></script>
<script src="/static/demo/script/zabuto_calendar.min.js"></script>

<script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
<script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>
<script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
<!--CORE JAVASCRIPT-->
<script src="/static/demo/script/main.js"></script>

<script th:inline="text">
    $(document).ready(function () {
        //数据获取
        // var jsondata = JSON.parse("[[${allcount}]]".replace(/&quot;/g, '"'));
        // var userjsondata = jsondata.user;
        //  var orderjsondata = jsondata.order;
        //  console.log(jsondata);

        //图表主题
        (function (a) {
            "object" === typeof module && module.exports ? module.exports = a : a(Highcharts)
        })(function (a) {
            a.createElement("link", {
                href: "https://fonts.googleapis.com/css?family\x3dDosis:400,600",
                rel: "stylesheet",
                type: "text/css"
            }, null, document.getElementsByTagName("head")[0]);
            a.theme = {
                colors: "#7cb5ec #f7a35c #90ee7e #7798BF #aaeeee #ff0066 #eeaaee #55BF3B #DF5353 #7798BF #aaeeee".split(" "),
                chart: {backgroundColor: null, style: {fontFamily: "Microsoft YaHei"}},
                title: {
                    style: {
                        fontSize: "18px", fontWeight: "900",
                        textTransform: "uppercase"
                    }
                },
                tooltip: {borderWidth: 0, backgroundColor: "rgba(219,219,216,0.8)", shadow: !1},
                legend: {itemStyle: {fontWeight: "bold", fontSize: "13px"}},
                xAxis: {gridLineWidth: 1, labels: {style: {fontSize: "12px"}}},
                yAxis: {
                    minorTickInterval: "auto",
                    title: {style: {textTransform: "uppercase"}},
                    labels: {style: {fontSize: "18px"}}
                },
                plotOptions: {candlestick: {lineColor: "#404048"}},
                background2: "#F0F0EA"
            };
            a.setOptions(a.theme)
        });
        /* Column Chart */
        var allcount=JSON.parse("[[${allcount}]]".replace(/&quot;/g, '"'));
        var onedaycount=JSON.parse("[[${onedaycount}]]".replace(/&quot;/g, '"'));
        var sevendaycount=JSON.parse("[[${sevendaycount}]]".replace(/&quot;/g, '"'));
        var monthdaycount=JSON.parse("[[${monthdaycount}]]".replace(/&quot;/g, '"'));
        $('#column-chart1').highcharts({
            chart: {
                type: 'column'
            },
            title: {
                text: '总活跃量'
            },
            subtitle: {
                text: '数据来源: hiwanda.com'
            },
            xAxis: {
                categories: [
                    '日活跃量', '周活跃量', '月活跃量', '总活跃量',
                ],
            },
            yAxis: {
                min: 0,
                title: {
                    text: '点击数'
                }
            },
            tooltip: {
                // head + 每个 point + footer 拼接成完整的 table
                headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
                pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
                '<td style="padding:0"><b>{point.y:.1f} 人次</b></td></tr>',
                footerFormat: '</table>',
                shared: true,
                useHTML: true
            },
            plotOptions: {
                column: {
                    borderWidth: 0
                }
            },
            series: [{
                name: '二手集市',
                data: [allcount['二手集市'],onedaycount['二手集市'],sevendaycount['二手集市'],monthdaycount['二手集市']]
            }, {
                name: '户外旅游',
                data: [allcount['户外旅游'],onedaycount['户外旅游'],sevendaycount['户外旅游'],monthdaycount['户外旅游']]
            }, {
                name: '一键租车',
                data: [allcount['一键租车'],onedaycount['一键租车'],sevendaycount['一键租车'],monthdaycount['一键租车']]
            }, {
                name: '投诉建议',
                data: [allcount['投诉建议'],onedaycount['投诉建议'],sevendaycount['投诉建议'],monthdaycount['投诉建议']]
            }]
        });
    });

</script>
</html>